import request from '@/utils/request'

export default {

    //1、讲师列表
    getTeacherListPage(current,limit,teacherQuery) {
        return request({
            url: `/eduservice/edu-teacher/pageTeacherCondition/${current}/${limit}`,
            method: 'post',
            //后端使用lRequestBody,所以这个表示的是用json数据返回给后端
            data: teacherQuery
    })
    },

    //删除讲师
    deleteTeacherId(id) {
        return request({
            url: `/eduservice/edu-teacher/${id}`,
            method: 'delete'
    })
    },
    //添加讲师
    addTeacher(teacher) {
        return request({
            url: `/eduservice/edu-teacher/addTeacher`,
            method: 'post',
            data: teacher
    })
    },
    getTeacherInfo(id) {
        return request({
            url: `/eduservice/edu-teacher/getTeacher/${id}`,
            method: 'get'
    })
    },
    //修改讲师
    updateTeacherInfo(teacher) {
        return request({
            url: `/eduservice/edu-teacher/updateTeacher`,
            method: 'post',
            data: teacher
    })
    }
}
